package com.ruoyi.project.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;

import lombok.Data;

/**
 * 内容对象 content
 * 
 * @author ruoyi
 * @date 2025-06-20
 */
@Data
public class Content
{

    /** 内容ID */
    private Long id;

    /** 所属栏目ID */
    private Long categoryId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 摘要 */
    @Excel(name = "摘要")
    private String summary;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 封面图片 */
    @Excel(name = "封面图片")
    private String coverImage;

    /** 创建人ID */
    private Long creatorId;

    /** 浏览量 */
    @Excel(name = "浏览量")
    private Long viewCount;

    /** 状态(0草稿/1已发布/2已归档) */
    @Excel(name = "状态(0草稿/1已发布/2已归档)")
    private Long status;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createBy;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updateBy;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("categoryId", getCategoryId())
            .append("title", getTitle())
            .append("summary", getSummary())
            .append("content", getContent())
            .append("coverImage", getCoverImage())
            .append("creatorId", getCreatorId())
            .append("viewCount", getViewCount())
            .append("status", getStatus())
            .append("publishTime", getPublishTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
